package com.r2coding.auth.web.util;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应码
 *
 * @author:98k灬
 * @since:2022/01/06 20:23
 **/
@Getter
@AllArgsConstructor
public enum ResultEnum {
    /**
     * 成功
     */
    SUCCESS(200, "success"),

    /**
     * 错误
     */
    ERROR(999, "error"),

    UNAUTHENTICATED(401, "请先通过身份认证"),
    AUTH_FAIL(1400, "认证失败"),

    // token异常
    TOKEN_PAST(1401, "身份过期，请求重新登录！"), TOKEN_ERROR(1402, "令牌错误"),

    HEADER_ERROR(1403, "请求头错误"),
    SERVICE_ERROR(1404, "业务异常"),

    AUTH_USERNAME_NONE(1405, "用户名不能为空"), AUTH_PASSWORD_NONE(1406, "密码不能为空"),

    MENU_NO(306, "没此权限，请联系管理员！");

    private final Integer code;
    private final String desc;
}
